<%@language=VBScript%>
<%
	Session("FormName")="F3"
%>
<!--#include file="..\CheckSession.inc"-->
<!--#include file=..\getFormName.inc-->
<!--#include file="..\RootContent.inc"-->
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<%
	sSQL="Select * from config"
	Set rs=server.createObject("ADODB.Recordset")
	rs.CursorType=3
	rs.CacheSize=5
	rs.open sSQL,Conn
	if rs.recordcount then
		bDatabaseN=rs("Databasename")
	end if
	rs.close
	Set rs=nothing
	
	if bTenCSDLSaoluu<>"" then
		bTenCSDLSaoluu=Request(bTenCSDLSaoluu)
	else
		bTenCSDLSaoluu=bDatabaseN &"_"&Hour(Time())&"h"&Minute(Time())&"_"& Day(Date())&"_"&Month(Date())
	end if

	if request("bOK")="ok" then
		On error resume next
		Filename=Request("TxtCSDLSaoLuu")
		projectname=Filename
		Folder="_" & Request("TxtNam")
		projectname=Filename & Folder
		Filename=Filename & Folder & ".dat"
		Path=server.MapPath("..\BackupDatabase")		

		Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
		PathFolder=Path' & "\" '& replace(Folder,"/","-")
		if not FileObject.FolderExists(PathFolder) then
			FileObject.CreateFolder(PathFolder)
		end if
		Path=PathFolder & "\"& Filename
	sSQL="insert into tblprojectbackup(projectname) values('"& projectname &"')"
	Conn.Execute sSQL
	sSQL="Select id from tblprojectbackup where projectname='"& projectname &"'"
	Set RecID=server.CreateObject("ADODB.Recordset")
	RecID.CursorType=3
	RecID.CacheSize=5
	RecID.Open sSQL,Conn
	if RecID.RecordCount then
		bid=RecID("ID")
	end if
	RecID.close
	Set RecID=nothing
	'create thu muc noidung
	Set bDir=server.CreateObject("ActiveFile.Directory")
    bPathNam=RootBackup & "NOIDUNG"
	bDir.Path=bPathNam
    if not bDir.Exists() then
	   	call bDir.Create(bPathNam)
	end if	
	Set bDir=nothing
	'create thu muc con trong thu muc noidung
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\" & fileObj.FileName)
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'tao thu muc con trong thu muc data
	set bCreateDir=Server.CreateObject("ActiveFile.Directory")
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\XULY"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\XULY")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\XULY\TEXT"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\XULY\TEXT")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\YEUCAU"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\YEUCAU")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT")
	end if
	Set bCreateDir=nothing
	'copy file trong thu muc data
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "DATA\XULY"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\XULY\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName)
					sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\XULY\"& fileObj.FileName &"')"
					Conn.Execute sSQL
				else
					bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName
					bngaymodibackup=bfile.LastModified
					bfile.Name=RootContent & "DATA\XULY\" & fileObj.FileName
					bngaymodiRootContent=bfile.LastModified
					if bngaymodiRootContent > bngaymodibackup then
						bfile.Name=RootContent & "DATA\XULY\" & fileObj.FileName
						bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName)
						sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\XULY\"& fileObj.FileName &"')"
						Conn.Execute sSQL
					end if
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\XULY\TEXT"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\XULY\TEXT\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName)
					sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\XULY\TEXT\"& fileObj.FileName &"')"
					Conn.Execute sSQL
				else
					bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName
					bngaymodibackup=bfile.LastModified
					bfile.Name=RootContent & "DATA\XULY\TEXT\" & fileObj.FileName
					bngaymodiRootContent=bfile.LastModified
					if bngaymodiRootContent > bngaymodibackup then
						bfile.Name=RootContent & "DATA\XULY\TEXT\" & fileObj.FileName
						bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName)
						sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\XULY\TEXT\"& fileObj.FileName &"')"
						Conn.Execute sSQL
					end if
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\YEUCAU\TEXT"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\YEUCAU\TEXT\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName)
					sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\YEUCAU\TEXT\"& fileObj.FileName &"')"
					Conn.Execute sSQL
				else
					bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName
					bngaymodibackup=bfile.LastModified
					bfile.Name=RootContent & "DATA\YEUCAU\TEXT\" & fileObj.FileName
					bngaymodiRootContent=bfile.LastModified
					if bngaymodiRootContent > bngaymodibackup then
						bfile.Name=RootContent & "DATA\YEUCAU\TEXT\" & fileObj.FileName
						bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName)
						sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\YEUCAU\TEXT\"& fileObj.FileName &"')"
						Conn.Execute sSQL
					end if
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\YEUCAU"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\YEUCAU\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName)
					sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\YEUCAU\"& fileObj.FileName &"')"
					Conn.Execute sSQL
				else
					bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName
					bngaymodibackup=bfile.LastModified
					bfile.Name=RootContent & "DATA\YEUCAU\" & fileObj.FileName
					bngaymodiRootContent=bfile.LastModified
					if bngaymodiRootContent > bngaymodibackup then
						bfile.Name=RootContent & "DATA\YEUCAU\" & fileObj.FileName
						bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName)
						sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'DATA\YEUCAU\"& fileObj.FileName &"')"
						Conn.Execute sSQL
					end if
				end if
				Set bfile=nothing
			end if
		Next
	set bCopyfile=Nothing
	' tao thu muc con trong thu muc giao ban
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent & "GIAOBAN\"
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\GIAOBAN\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName)
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\NAM\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\QUY\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\THANG\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\TUAN\")
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'Copy file trong thu muc giaoban
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "GIAOBAN\"
		For Each fileObjfolder in bCopyfile.Files
			If fileObjfolder.IsDirectory Then	
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
			end if
		Next
	set bCopyfile=nothing
	' tao thu muc con trong thu muc Upload
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent & "UPLOAD\"
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\UPLOAD\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName)
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DEN\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DEN\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DI\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DI\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DUTHAO\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DUTHAO\TEXT")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\NOIBO\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\NOIBO\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\QUYETDINH\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\QUYETDINH\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\TOTRINH\")
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'Copy file trong thu muc Upload
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "UPLOAD\"
		For Each fileObjfolder in bCopyfile.Files
			If fileObjfolder.IsDirectory Then	
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName)
							sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName &"')"
							Conn.Execute sSQL
						else
							bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
							bngaymodibackup=bfile.LastModified
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
							bngaymodiRootContent=bfile.LastModified
							if bngaymodiRootContent > bngaymodibackup then
								bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
								bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName)
								sSQL="insert into tblbackup(ID,pathname) values ("& bid &",'UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName &"')"
								Conn.Execute sSQL
							end if
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
			end if
		Next
	set bCopyfile=nothing

		if Request("R1")="true" then
			if FileObject.FileExists(path) then
				bM=false
			else
				bM=true
				sSQL="Backup Database "& bDatabaseN &" to Disk='"& Path &"'"
				Conn.Execute sSQL
			end if
		else
			bM=true
			sSQL="Backup Database "& bDatabaseN &" to Disk='"& Path &"'"
			Conn.Execute sSQL
		end if
		%><%=Err.Description%><%
		if Err.number=0 then
			bmsg=true
			bTrangthailog=1
		else
			bmsg=false
			bTrangthailog=0
		end if
		'Ghi nhan Ai da login thanh cong						
		bHoten=Session("bHoten")
		bNgaygio=cstr(Date()) &" "& cstr(Time())
		bChucnang="Thay &#273;&#7893;i Sao l&#432;u CSDL"
		bIDTailieu=""
		bDongtac="Sao l&#432;u"
		sSQL="insert into loguser(Tennguoisudung,ngaygio,chucnangdung,dongtac,IDTailieu,Trangthai) Values('"& bHoten _
			&"','"& bNgaygio &"','"& bChucnang &"','"& bDongtac &"','"& bIDTailieu &"','"& bTrangthailog &"')"
		Conn.Execute sSQL
	end if
%>	
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function CmdOK_onclick() {
	if(frm.TxtCSDLSaoLuu.value==""){
		alert("Bạn cần nhập tên CSDL");
		frm.TxtCSDLSaoLuu.focus;
		return false;
	}
	window.frm.action="backup.asp?bOK=ok";
	window.frm.submit();
}
function CmdExit_onclick() {
	window.frm.action="../leftmain.asp";
	window.frm.target="main"
	window.frm.submit();
}

function SetFocus(){
	window.frm.TxtCSDLSaoLuu.focus();
}

//-->
</SCRIPT>
</HEAD>
<BODY bgcolor=#F8F9D9 style="font-family:Times new roman" onload="SetFocus()">
<Div align=center>
&nbsp;
&nbsp;
&nbsp;
<%if request("bOK")="ok" then
	if bMsg then
		if not bM then
			%><font color=red>Tên file đã tồn tại</font><%
		else
			%><font color=blue>Dữ liệu đã được sao lưu</font><%
		end if
	end if
	if not bMsg then
		%><font color=red>Lỗi sao lưu dữ liệu</font><%
	end if
  end if
%>
<form name=frm method=post >

<TABLE border=0 cellSpacing=1 width=500 bgcolor="#bdd5d0" style="BORDER-BOTTOM-STYLE: solid; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-TOP-STYLE: solid;Border-color:#C0C0C0">
    <TR>
        <TD COLSPAN=3 WIDTH="500" BGCOLOR="#000080"><P ALIGN=CENTER><FONT FACE='Times new roman' SIZE=2 COLOR=WHITE>
        XÁC NHẬN CÁC LỰA CHỌN</FONT></P></TD>
    </TR>
    <TR>
        <TD width="35%">Tên cơ sở dữ liệu nguồn</TD>
        <TD width="65%" colSpan=2>
        <textarea name="TxtCSDLNguon" readonly style="width:100%; background-color:#DFDFDF; font-family:Arial; font-size:10pt" rows=1 cols="20"><%=trim(bDatabaseN)%></textarea></TD>
    </TR>
    <TR>
        <TD width="35%"><label for=T1 accesskey="T"><u>T</u>ên cơ sở dữ liệu sao lưu</label></TD>
        <TD width="55%">
        <textarea name="TxtCSDLSaoLuu" style="width:100%; font-family:Arial; font-size:10pt" rows=1 cols="20" id=T1><%=bTenCSDLSaoluu%></textarea></TD>
        <TD width="10%">
        <INPUT name="TxtNam" readonly style="WIDTH:100%; background-color:#DFDFDF"  value=<%=Year(Date())%> size="20"></TD>
    </TR>
    <TR>
        <TD width="35%">Ðịa chỉ được sao lưu tới</TD>
        <TD  width="65%" colSpan=2>
            <textarea name="TxtDiachitoi" readonly style="width:100%; background-color:#DFDFDF; font-family:Arial; font-size:10pt" rows=1 cols="20"><%=server.MapPath("..\BackupDatabase\")%></textarea></TD>
    </TR>
    <TR>
        <TD width="35%"><INPUT CHECKED name=R1 type=radio ID=_R1 value=true><label for=_R1 accesskey="m">Ghi dữ liệu <u>m</u>ới</label></TD>
        <TD width="65%" colSpan=2></TD>
    </TR>
    <TR>
        <TD width="35%"><INPUT name=R1 type=radio ID=_R2 value=false><label for=_R2 accesskey="c">Ghi đè dữ liệu <u>c</u>ũ</label></TD>
        <TD width="65%" colSpan=2 align=left>
	 		<Button name=CmdOK style="HEIGHT: 25px; WIDTH: 80px;font-family:Arial" LANGUAGE=javascript onclick="return CmdOK_onclick()" accesskey="G"><p><u>G</u>hi nhận</p></Button>
			<Button name=CmdExit style="HEIGHT: 25px; WIDTH: 80px;font-family:Arial" LANGUAGE=javascript onclick="return CmdExit_onclick()" accesskey="Q"><p><u>Q</u>uay lại</p></Button></TD>
    </TR>
</TABLE>
</Div>
</form>
</BODY>
</HTML>